/*
 * Copyright (C) 2013 Félix Marín Ramírez | felixmurcia@gmail.com
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/*
 * DOCUMENTACION: http://documentacion-emple-depart.tk
 */
package adgui.vista;

import javax.swing.JPanel;
import javax.swing.JTabbedPane;

/**
 *
 * @author Félix Marín Ramírez | felixmurcia@gmail.com
 * @version 1.0
 */
public final class PanelTabDepart extends JPanel implements Implementable {

    private JTabbedPane tabbeds;
    private AltaDep aDep;
    private BajaDep bDep;
    private ConsultarDepart cDep;

    /**
     * Constructor de la clase encargado de inicializar todos los elementos del
     * JPanel.
     */
    public PanelTabDepart() {
        aDep = new AltaDep();
        bDep = new BajaDep();
        cDep = new ConsultarDepart();
        this.addToTabs();
    }

    @Override
    public JPanel getJPanel() {
        return this;
    }

    @Override
    public void addToTabs() {
        this.tabbeds = new JTabbedPane();
        this.tabbeds.add("Alta", aDep.getJPanel());
        this.tabbeds.add("Baja", bDep.getJPanel());
        this.tabbeds.add("Consultar", cDep.getJPanel());
        this.add(tabbeds);
    }
}
